// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
   

  },

  todetail:function(e){
    if(app.globalData.ilog==0){
      wx.showToast({
        icon:'error',
        title: '请先登录注册',
      })
      return;
    }
    var id=e.currentTarget.dataset.id;
    wx.navigateTo({
      url: '../dongtaidetail/detail?id='+id,
    })
  },


  onLoad() {
    var that = this;
    wx.request({
      url: app.globalData.headurl + '/lunt/selectAllLunt',
      success: function (res) {
        that.setData({
          luntList: res.data
        });
      }
    })
  },

  onShow:function(){
    this.onLoad();
  }

})
